<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel panel-heading">
        <h1 class="panel-title">
          权限列表
        </h1>
      </div>
      <div class="panel panel-body">
        <div ng-show="roles.length==0">暂时没有数据</div>
        <table class="table table-hover table-striped table-bordered" ng-hide="roles.length==0">
          <thead>
          <tr>
            <th>ID</th>
            <th>权限名称</th>
            <th>描述</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          <tr ng-repeat="role in roles">
            <td>{{role.id}}</td>
            <td>{{role.name}}</td>
            <td>{{role.description}}</td>
            <td>
              <button class="btn btn-primary btn-sm" ui-sref="app.roleEdit({id:role.id})">修改</button>
              <button class="btn btn-primary btn-sm" ng-click="deleteRole(role.id,role.description)">删除
              </button>
            </td>
          </tr>
          </tbody>
        </table>

      </div>
      <div class="panel-footer">
        <button class="btn btn-success" ui-sref="app.roleEdit">添加权限</button>
        <button class="btn btn-info" ui-sref="app.home">返回首页</button>
      </div>
    </div>
  </div>
</div>
